package com.qcby.Service.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qcby.Mapper.TrainStationMapper;
import com.qcby.Entity.TrainStation;
import com.qcby.Service.TrainStationService;

import java.util.List;

@Service
public class TrainStationServiceImpl implements TrainStationService {

   @Autowired
   private TrainStationMapper trainStationMapper;

        @Override
        public int deleteByPrimaryKey(Integer id) {
            return trainStationMapper.deleteByPrimaryKey(id);
        }

        @Override
        public int insert(TrainStation record) {
            return trainStationMapper.insert(record);
        }

        @Override
        public int insertSelective(TrainStation record) {
            return trainStationMapper.insertSelective(record);
        }

        @Override
        public TrainStation selectByPrimaryKey(Integer id) {
            return trainStationMapper.selectByPrimaryKey(id);
        }

        @Override
        public int updateByPrimaryKeySelective(TrainStation record) {
            return trainStationMapper.updateByPrimaryKeySelective(record);
        }

        @Override
        public int updateByPrimaryKey(TrainStation record) {
            return trainStationMapper.updateByPrimaryKey(record);
        }

        @Override
        public int getStationNumByStationName(TrainStation trainStation){
            return trainStationMapper.getStationNumByStationName(trainStation);
        }

        public List<TrainStation> getAllStations(){
            return trainStationMapper.getAllStations();
        }
}
